<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Mocha Tests</title>
    <link rel="stylesheet" href="../../../base/test/vendor/mocha.css" />
  </head>
  <body>
    <div id="mocha"></div>
    <div id="fixture" style="position: absolute; top: -9999px; left: -9999px"></div>

    <!-- Test Runner -->
    <script src="../../../base/test/vendor/sinon.js"></script>
    <script src="../../../base/test/vendor/mocha.js"></script>
    <script src="../../../base/test/vendor/chai.js"></script>
    <script>
      mocha.setup('bdd');
      var assert = chai.assert;

      // Export sinon.assert methods onto assert.
      sinon.assert.expose(assert, {prefix: ''});

      var ckan = {ENV: 'testing'};
    </script>

    <!-- Source -->
    <script src="../../../base/vendor/jed.js"></script>
    <script src="../../../base/vendor/jquery.js"></script>
    <script src="../../../base/vendor/bootstrap/js/bootstrap-transition.js"></script>
    <script src="../../../base/vendor/bootstrap/js/bootstrap-alert.js"></script>
    <script src="../../../base/javascript/plugins/jquery.inherit.js"></script>
    <script src="../../../base/javascript/plugins/jquery.proxy-all.js"></script>
    <script src="../../../base/javascript/sandbox.js"></script>
    <script src="../../../base/javascript/module.js"></script>
    <script src="../../../base/javascript/pubsub.js"></script>
    <script src="../../../base/javascript/client.js"></script>
    <script src="../../../base/javascript/notify.js"></script>
    <script src="../../../base/javascript/i18n.js"></script>
    <script src="../../../base/javascript/main.js"></script>
    <script src="../javascript/modules/plot.js"></script>
    <script src="../javascript/modules/stats-nav.js"></script>

    <!-- Suite -->
    <script src="./spec/modules/plot.spec.js"></script>
    <script src="./spec/modules/stats-nav.spec.js"></script>

    <script>
      beforeEach(function () {
        this.fixture = jQuery('#fixture').empty();
      });

      afterEach(function () {
        this.fixture.empty();
      });

      mocha.run().globals(['ckan', 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval']);
    </script>
  </body>
</html>
